<script setup>

import Son from "@/ComponentCommunication/02-自定义事件/Son.vue";

function test(event) {
  console.log('事件对象:', event)
}

function xyz(value) {
  console.log("触发自定义事件")
  console.log(value) // 666
}
</script>

<template>
  <button @click="test($event)"></button>
  <!--自定义的事件的命名必须为kebab-case-->
  <Son @haha="xyz"></Son>
</template>

<style scoped>

</style>